package org.example.servicelogin.vo;

import lombok.Data;
import java.util.List;

import lombok.NoArgsConstructor;
import org.example.model.manage.bean.po.security.SysRole;
import org.example.model.manage.bean.po.security.SysPermissions;
import org.example.model.manage.bean.po.security.User;

@NoArgsConstructor
@Data
public class UserVo {
    private Integer id;

    private String account;

    private String name;
    
    // 新增身份字段
    private String role;

    public UserVo(User u, String name) {
        this.id = u.getId();
        this.account = u.getAccount();
        this.name = name;
        this.role = u.getType(); // 根据数据库的type字段返回身份
    }
}
